<template>
    <div>
        <home-header></home-header>
        <home-swiper :list="swiperList"></home-swiper>
    </div>
</template>

<script>
import HomeHeader from './components/Header'
import HomeSwiper from './components/Swiper'
import axios from 'axios'
export default {
  name: 'Home',
  components: {
      HomeHeader,
      HomeSwiper,
  },
  data () {
    return {
     swiperList:[]
    }
  },
  methods : {
   getHomeInfo () {
       axios.get('/api/index.json')
        .then(this.getHomeInfoSucc)
   },
   getHomeInfoSucc(res) {
        res = res.data;
       if(res.ret && res.data){
           const data = res.data;
           this.swiperList = data.swiperList;
       }
   }
  },
  mounted () {
   this.getHomeInfo();
  },
  computed: {
    
  }
}
</script>

<style>
</style>
